Terminal device and non-transitory computer-readable medium storing computer-readable instructions for terminal device

ABSTRACT

A terminal device may display a setting screen for inputting setting information; after the setting information is inputted in the setting screen, supply a communication executing instruction to an OS program. The OS program may supply a signal sending instruction to a first wireless interface. The first wireless interface may start sending a polling signal, establish a first wireless connection with a function executing device, and communicate connection information with the function executing device by using the first wireless connection. The OS program may establish, by using the connection information, a second wireless connection for communicating with the function executing device via a second wireless interface. In a case where the second wireless connection is established, the terminal device may send a function executing request to the function executing device via the second wireless interface by using the second wireless connection.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to Japanese Patent Application No.2018-37899 filed on Mar. 2, 2018, the contents of which are herebyincorporated by reference into the present application.

TECHNICAL FIELD

The disclosure herein discloses a technique for sending a functionexecuting request to a function executing device.

DESCRIPTION OF RELATED ART

A technique for sending print data from a portable terminal to amultifunction peripheral (MFP) is known. A user operates the portableterminal to activate an application program for generating a printinginstruction, and brings the portable terminal close to the MFP. In thiscase, a Near Field Communication (NFC) connection is established betweenthe portable terminal and the MFP. The portable terminal sends theprinting instruction to the MFP by using the NFC connection, receives aService Set Identifier (SSID) and the like from the MFP, and establishesa Wi-Fi Direct (registered trademark; WFD) connection with the MFP byusing the received SSID and the like. By doing so, the portable terminalcan send the print data to the MFP by using the WFD connection.

SUMMARY

In the above technique, there is no consideration regarding the userinputting setting information for printing (such as a paper size,color/monochrome, etc.). If the WFD connection is established before thesetting information is inputted by the user, the print data may be sentto the MFP by using default setting information, for example, as aresult of which printing according to setting information differing fromwhat the user had intended may be executed.

The disclosure herein provides a technique for causing a functionexecuting device to execute a specific function according to settinginformation inputted by a user.

A non-transitory computer-readable medium storing computer-readableinstructions for a terminal device is disclosed herein. Thecomputer-readable instructions, when executed by a processor of theterminal device, may cause the terminal device to: in a case where aninstruction for using a specific function executable by a functionexecuting device is inputted, cause a display unit of the terminaldevice to display a setting screen for inputting setting information forexecuting the specific function; after the setting information isinputted in the setting screen, supply a communication executinginstruction to an operating system (OS) program of the terminal device,the communication executing instruction being for instructing to executecommunication via a first wireless interface of the terminal device, thecommunication executing instruction being not supplied to the OS programbefore the setting information is inputted in the setting screen,wherein the OS program supplies a signal sending instruction to thefirst wireless interface in response to obtaining the communicationexecuting instruction, the first wireless interface starts sending apolling signal in response to obtaining the signal sending instruction,establishes a first wireless connection with the function executingdevice in response to sending the polling signal to the functionexecuting device, and communicates connection information with thefunction executing device by using the first wireless connection, andthe OS program establishes, by using the connection information, asecond wireless connection for communicating with the function executingdevice via a second wireless interface of the terminal device, thesecond wireless interface being different from the first wirelessinterface; and in a case where the second wireless connection isestablished, send a function executing request to the function executingdevice via the second wireless interface by using the second wirelessconnection, the function executing request being for causing thefunction executing device to execute the specific function according tothe setting information.

The above terminal device itself and a control method implemented by theterminal device are also novel and useful.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a configuration of a communication system;

FIG. 2 shows a sequence diagram of a print process;

FIG. 3 shows screens displayed in a portable terminal;

FIG. 4 shows a flowchart of a process of a terminal device according toa second embodiment;

FIG. 5 shows a sequence diagram of Case A in which a Wi-Fi connection isnot being established; and

FIG. 6 shows a sequence diagram of Case B in which a Wi-Fi connection isbeing established.

EMBODIMENTS First Embodiment

(Configuration of Communication System 2; FIG. 1)

As shown in FIG. 1, a communication system 2 includes a portableterminal 10 and a multifunction peripheral 100. Each of the devices 10,100 is configured to execute wireless communication according to a NearField Communication (NFC) scheme (that is, a kind of so-callednear-range wireless communication) and wireless communication accordingto a Wi-Fi scheme with each other.

(Configuration of Multifunction Peripheral 100)

The multifunction peripheral 100 is a peripheral (that is, a peripheralof the portable terminal 10) capable of executing multiple functionsincluding a print function and a scan function. The multifunctionperipheral 100 includes an NFC interface 114 and a Wi-Fi interface 116.Hereinbelow, an interface may be denoted “I/F”.

The Wi-Fi I/F 116 is an I/F configured to execute wireless communicationaccording to the Wi-Fi scheme. The Wi-Fi scheme is a wirelesscommunication scheme for executing wireless communication according to802.11 standard of IEEE (the Institute of Electrical and ElectronicsEngineers, Inc.) and standards complying thereto (such as 802.11a, 11b,11g, 11n, etc.). The Wi-Fi I/F 116 especially supports a Wi-Fi Direct(registered trademark; WFD) scheme established by the Wi-Fi Alliance.The WFD scheme is a wireless communication scheme described in thestandard “Wi-Fi Peer-to-Peer (P2P) Technical Specification Version 1.1”published by the Wi-Fi Alliance.

The multifunction peripheral 100 is configured to operate in one of aGroup Owner (G/O) state, a Client (CL) state, and a device state of theWFD scheme. The multifunction peripheral 100 can operate as a G/O of theWFD scheme and create a Wi-Fi network to which the multifunctionperipheral 100 and an external device (such as the portable terminal 10)belong. In this case, the multifunction peripheral 100 can cause theexternal device to participate in the Wi-Fi network as a child station.In a variant, the multifunction peripheral 100 may operate as a SoftAPand create a network to which the multifunction peripheral 100 and anexternal device belong.

The NFC I/F 114 is a wireless I/F for executing wireless communicationaccording to the NFC scheme. The NFC scheme is, for example, a wirelesscommunication scheme based on the international standard ISO/IEC 21481or 18092. The NFC I/F 114 is an NFC forum tag. The NFC forum tag is aninterface that functions as an Integrated Circuit (IC) tag according tothe NFC scheme. In a case of receiving a polling signal from an externaldevice (such as the portable terminal 10), the NFC I/F 114 sends aresponse signal to the polling signal to the external device andestablishes an NFC connection with the external terminal.

The NFC I/F 114 stores connection information CI. The connectioninformation CI is information for causing an external device toparticipate in the Wi-Fi network in which the multifunction peripheral100 operates as a parent station, and includes a Service Set Identifier(SSID) “xxx” for identifying the Wi-Fi network and a password “1234”.The SSID “xxx” and the password “1234” are generated by themultifunction peripheral 100 and stored in the NFC I/F 114.

Here, differences between the Wi-Fi I/F and the NFC I/F will bedescribed. A communication speed of wireless communication via the Wi-FiI/F (a maximum communication speed of 11 to 600 Mbps, for example) isfaster than a communication speed of wireless communication via the NFCI/F (a maximum communication speed of 100 to 424 Kbps, for example).Further, a frequency used in wireless communication via the Wi-Fi I/F(2.4 GHz band or 5.0 GHz band, for example) is different from afrequency used in wireless communication via the NFC I/F (13.56 MHzband, for example). Further, a maximum distance with which wirelesscommunication can be executed via the Wi-Fi I/F (about 100 m at maximum,for example) is greater than a maximum distance with which wirelesscommunication can be executed via the NFC I/F (about 10 cm at maximum,for example).

(Configuration of Portable Terminal 10)

The portable terminal 10 is a mobile terminal such as a cellphone, asmartphone, and a tablet PC. The portable terminal 10 includes a displayunit 12, an NFC I/F 14, a Wi-Fi I/F 16, and a controller 20. Each of theunits 12 to 20 is connected to a bus line (to which a reference sign isnot given).

The display unit 12 is a display for displaying various types ofinformation. The display unit 12 functions as a so-called touch panel.That is, the display unit 12 functions also as an operation unit to beoperated by a user.

The NFC I/F 14 is a wireless I/F for executing NFC communicationaccording to the NFC scheme, and is an NFC forum device. The NFC forumdevice is an I/F configured to selectively operate in one of a Peer toPeer (P2P) mode, a Reader/Writer (R/W) mode, and a Card Emulation (CE)mode. The NFC I/F 14 is configured to operate at least in the R/W mode.In a case of operating in a Reader mode, the NFC I/F 14 is configured toread data from the NFC I/F 114 of the multifunction peripheral 100, thatis, to receive data from the NFC I/F 114. Further, in a case ofoperating in a Writer mode, the NFC I/F 14 is configured to write datain the NFC I/F 114, that is, to send data to the NFC I/F 114.

The Wi-Fi I/F 16 is similar to the Wi-Fi I/F 116 of the multifunctionperipheral 100. However, the Wi-Fi I/F 16 does not support the WFDscheme. The Wi-Fi I/F 16 can establish a wireless connection with theWi-Fi I/F 116 of the multifunction peripheral 100 and participate in theWi-Fi network, as the child station (so-called legacy), in which theprinter 100 operates as the parent station.

The controller 20 includes a CPU 22 and a memory 24. The CPU 22 isconfigured to execute various processes according to programs 26, 28stored in the memory 24. The memory 24 is constituted of a volatilememory, a nonvolatile memory and the like. The memory 24 stores anOperating System (OS) program 26 for implementing basic processes, aprint scan application program (hereinbelow termed “print scan app”) 28,and a plurality of image information (that is, plural image files) IM1to IM3 representing plural images. In this embodiment, a situation isassumed in which the OS program 26 is iOS (registered trademark).

The print scan app 28 is a program provided by a vendor of themultifunction peripheral 100, and is a program for sending an executingrequest for causing the multifunction peripheral 100 to execute print orscan, to the multifunction peripheral 100. The print scan app 28 may beinstalled in the portable terminal 10 from a server (not shown) providedby the vendor on the Internet, or may be installed in the terminaldevice 10 from a medium shipped with the multifunction peripheral 100,for example.

(Print Process; FIGS. 2 and 3)

A process through which the portable terminal 10 causes themultifunction peripheral 100 to execute printing will be described withreference to FIGS. 2 and 3. Hereinbelow, for easier understanding,processes which the CPU 22 of the portable terminal 10 executes inaccordance with the OS program 26 will not be described with the CPU 22as the subject of action, but with the OS program 26 as the subject ofaction. Further, similarly, processes which the CPU 22 executes inaccordance with the print scan app 28 will not be described with the CPU22 as the subject of action, but with the print scan app 28 as thesubject of action.

In T10, an operation to activate the print scan app 28 (hereinbelowdenoted as “app 28” in short) is performed on the portable terminal 10by a user, as a result of which the app 28 is activated. In T12, the app28 causes the display unit 12 to display a menu screen SC1. As shown inFIG. 3, the menu screen SC1 includes a print button B1 for accepting aninstruction to use the print function of the multifunction peripheral100 and a scan button B2 for accepting an instruction to use the scanfunction of the multifunction peripheral 100. In T14, the app 28 acceptsa selection of the print button B1.

In T16, the app 28 causes the display unit 12 to display an imageselecting screen SC2. The image selecting screen SC2 is a screen forselecting image information that represents an image to be printed bythe multifunction peripheral 100. As shown in FIG. 3, the imageselecting screen SC2 includes plural thumbnail images SI1 to SI3represented by the plurality of image information IM1 to IM3 in thememory 24. In T18, the app 28 accepts from the user a selection of thethumbnail image SH represented by the image information IM1 from amongthe plural thumbnail images SI1 to SI3.

In T20, the app 28 causes the display unit 12 to display a settingscreen SC3. The setting screen SC3 is a screen for inputting settinginformation for execution of the print function. As shown in FIG. 3, thesetting screen SC3 includes input field IF3 and an OK button B3. Theinput field IF3 is a field for inputting plural setting values (such aspaper size “A4” and color/monochrome “Color”) corresponding to pluralsetting items (such as the paper size and color/monochrome) forexecution of the print function. The OK button B3 is a button selectedby the user when the input of the setting information is completed. InT22, the app 28 accepts the input of the setting information (that is,the plural setting values) and a selection of the OK button B3 from theuser.

In T24, the app 28 causes the display unit 12 to display a previewscreen SC4 including a preview image PI1 (see FIG. 3). Specifically, theapp 28 converts the image information IM1 corresponding to the thumbnailimage SI1 selected in T18 in accordance with the setting informationinputted in the setting screen SC3 to generate preview image informationrepresenting an image to be printed in the multifunction peripheral 100.Then, the app 28 causes the display unit 12 to display the previewscreen SC4 including the preview image PH represented by the generatedpreview image information. Further, the preview screen SC4 includes acancel button B4. The cancel button B4 is a button for accepting aninstruction to re-input setting information from the user. When thecancel button B4 is selected, the setting screen SC3 is displayed again.Further, the preview screen SC4 can accept a scale-changing operationfor zooming the preview image PI1 in or out.

Further, in T26, the app 28 supplies a communication executinginstruction to the OS program 26 with the selection of the OK button B3in the setting screen SC3 as its trigger. In other words, the app 28does not supply the communication executing instruction to the OSprogram 26 until the OK button B3 is selected in the setting screen SC3since the app 28 was activated. The communication executing instructionis a command for instructing to send a polling signal via the NFC I/F14. Here, the app 28 supplies the communication executing instruction tothe OS program 26 after a predetermined time (such as 5 seconds) haselapsed since the preview screen SC4 began to be displayed on thedisplay unit 12 (that is, since the OK button B3 was selected in thesetting screen SC3). The predetermined time is preset by the vendor ofthe multifunction peripheral 100. Further, the predetermined time may bechanged by updates or the like of the app 28 after the app 28 has beeninstalled in the portable terminal 10. Further, the app 28 may pausecounting the predetermined time while accepting the scale-changingoperation in the preview screen SC4. Alternatively, the app 28 may erasecount of the predetermined time in a case of accepting thescale-changing operation, and start counting the predetermined timeagain from a timing when the scale-changing operation has beenterminated. Further, a configuration may be employed in which thecommunication executing instruction is not supplied to the OS program 26in the case where the scale-changing operation is accepted, even if itis determined that the predetermined time has elapsed by termination ofthe count of the predetermined time. That is, in general, in a casewhere an operation from the user is accepted via the preview screen SC4,either of the configuration in which the count of the predetermined timeis paused, the configuration in which the count of the predeterminedtime is erased, or the configuration in which the communicationexecuting instruction is not supplied to the OS program 26 even if it isdetermined that the predetermined time has elapsed by termination of thecount of the predetermined time.

When obtaining the communication executing instruction from the app 28in T26, the OS program 26 supplies a signal sending instruction to theNFC I/F 14 in T28. The signal sending instruction is a command forcausing the NFC I/F 14 to start sending a polling signal.

Further, when obtaining the communication executing instruction from theapp 28 in T26, the OS program 26 causes the display unit 12 to displayan NFC screen SC5 (see FIG. 3) in T30. The NFC screen SC5 is a screenindicating that communication via the NFC I/F 14 is executable, andspecifically, it includes a message prompting the user to bring theportable terminal 10 close to the multifunction peripheral 100. As shownin FIG. 3, the NFC screen SC5 is displayed in front of the previewscreen SC4. The NFC screen SC5 overlaps a part of the preview screen SC4(that is, in an example of FIG. 3, a lower portion of the preview imagePH and the cancel button B4). Due to this, when the NFC screen SC5 isdisplayed, a part of the preview screen SC4 becomes hidden. That is, theNFC screen SC5 is displayed preferentially over the preview screen SC4.Further, a screen that is displayed behind the NFC screen SC5 cannotaccept an operation. Due to this, even if the NFC screen SC5 does notoverlap the cancel button B4 of the preview screen SC4, the user cannotselect the cancel button B4. Display of the NFC screen SC5 is executedby the OS program 26, and the app 28 cannot instruct the OS program 26not to display the NFC screen SC5.

For example, a comparative example is assumed in which the communicationexecuting instruction is supplied to the OS program 26 immediately afterthe preview screen SC4 is displayed. In this case, since the NFC screenSC5 is displayed by the OS program 26 immediately after the previewscreen SC4 is displayed, the user cannot see a part of the previewscreen SC4. In this embodiment, the communication executing instructionis supplied to the OS program 26 after the predetermined time haselapsed since the preview screen SC4 began to be displayed. Due to this,the NFC screen SC5 is not displayed until the predetermined time haselapsed since the preview screen SC4 began to be displayed, as a resultof which the user can see an entirety of the preview screen SC4. In avariant, the configuration of the comparative example as above may beemployed.

When the NFC I/F 14 obtains the signal sending instruction from the OSprogram 26 in T28, it starts sending a polling signal in T32A. The usersees the NFC screen SC5 displayed in the portable terminal 10 and bringsthe portable terminal 10 close to the multifunction peripheral 100. Dueto this, in T32B, a distance between the NFC I/F 14 and the NFC I/F 114of the multifunction peripheral 100 becomes a predetermined distance(such as 10 cm) or less, and thus the polling signal is received by themultifunction peripheral 100.

In T50, the NFC I/F 14 receives a response signal to the polling signalfrom the NFC I/F 114 of the multifunction peripheral 100 and establishesan NFC connection with the multifunction peripheral 100. In T52, the NFCI/F 14 operates in the Reader mode to read (that is, receive) theconnection information CI from the NFC I/F 114 of the multifunctionperipheral 100. Then, in TM, the NFC I/F 14 supplies the connectioninformation CI to the OS program 26.

When the OS program 26 obtains the connection information CI from theNFC I/F 14 in T54, it supplies the obtained connection information CI tothe app 28 in T56. Due to this, in T58, the app 28 stores the connectioninformation CI obtained from the OS program 26 in the memory 24. In avariant, the process of T58 may be executed by the OS program 26.

In T60, the app 28 causes the display unit 12 to display a notificationscreen SC6 (see FIG. 3). The notification screen SC6 is a screen fornotifying the user to select OK in an inquiry screen SC7 to be describedlater. Due to this, the user can be prompted to perform an appropriateoperation.

In T62, the app 28 closes the notification screen SC6 in a case where aClose button B6 included in the notification screen SC6 is selected andsupplies a connection instruction to the OS program 26. The connectioninstruction is a command for instructing to establish a wirelessconnection via the Wi-Fi I/F 16 (hereinbelow termed “Wi-Fi connection”).

When obtaining the connection instruction from the app 28 in T62, the OSprogram 26 causes the display unit 12 to display the inquiry screen SC7(see FIG. 3) in T64. The inquiry screen SC7 includes a message inquiringthe user whether or not to connect to the Wi-Fi network identified bythe SSID “xxx” and an OK button B7.

When the OS program 26 accepts a selection of the OK button B7 in T64,it supplies a Wi-Fi instruction to the Wi-Fi I/F 16 in T66. The Wi-Fiinstruction is a command for causing the Wi-Fi I/F 16 to executecommunication of various signals (such as an Authentication signal, anAssociation signal, a 4-way handshake, etc.) for establishing a Wi-Ficonnection. The Wi-Fi instruction includes the connection information CIreceived in T54 and stored in the memory 24. In the course of thecommunication of the various signals, the password in the connectioninformation CI is sent to the multifunction peripheral 100 andauthentication of the password is executed by the multifunctionperipheral 100. Due to this, the OS program 26 establishes a Wi-Ficonnection with the multifunction peripheral 100 in T68. As a result,the portable terminal 10 participates as a child station (that is, alegacy) in the Wi-Fi network in which the multifunction peripheral 100operates as the parent station.

When the Wi-Fi connection is established, in T70, the app 28 generatesprint data by converting the image information IM1 according to thesetting information inputted in T22. The print data includes convertedimage information having a data format which is interpretable by themultifunction peripheral 100 and the setting information inputted inT22. In T72, the app 28 sends a print executing request including thegenerated print data to the multifunction peripheral 100 via the Wi-FiI/F 16 by using the Wi-Fi connection established in T68. The printexecuting request is a request for causing the multifunction peripheral100 to execute printing of an image according to the print data.

When the multifunction peripheral 100 receives the print executingrequest in T72 from the portable terminal 10, it executes printing ofthe image represented by the converted image information included in theprint data in accordance with the setting information included in theprint data in the print executing request in T74.

According to the process of FIG. 2, the portable terminal 10 does notsupply the communication executing instruction to the OS program 26before the setting information is inputted in the setting screen SC3. Assuch, a situation in which a Wi-Fi connection is established before thesetting information is inputted by the user and the print executingrequest is sent to the multifunction peripheral 100 by using, forexample, default setting information can be suppressed. The portableterminal 10 supplies the communication executing instruction to the OSprogram 26 (T26 of FIG. 2) in the case where the OK button B3 isselected after the setting information has been inputted in the settingscreen SC3. Due to this, the signal sending instruction is supplied fromthe OS program 26 to the NFC I/F 14 (T28), the connection information CIis received from the multifunction peripheral 100 through the NFC I/F 14(T56), and the Wi-Fi connection via the Wi-Fi I/F 16 is established(T68). As a result, the portable terminal 10 can send the printexecuting request for causing the multifunction peripheral 100 toexecute printing in accordance with the setting information inputted bythe user, to the multifunction peripheral 100 by using the Wi-Ficonnection (T72).

(Scan Process)

Next, a process through which the portable terminal 10 causes themultifunction peripheral 100 to execute scanning will be described withreference to FIGS. 2 and 3. The app 28 executes similar processes to T10and T12 of FIG. 2 to cause the display unit 12 to display the menuscreen SC1 (see FIG. 3). The app 28 accepts a selection of the scanbutton B2 in the menu screen SC1, instead of T14 of FIG. 2. In thiscase, the app 28 causes the display unit 12 to display a setting screenSC13 (see FIG. 3), instead of T16 to T20. The setting screen SC13includes an input field IF13 and an OK button B13. The input field IF13is a field for inputting plural setting values (such as a paper size“A4”, a resolution “300 dpi”, and a data format “PDF”) corresponding toplural setting items (such as the paper size, the resolution, and thedata format) for executing the scan function. When the app 28 accepts aselection of the OK button B13 in the setting screen SC13 in T22, itcauses the display unit 12 to display a setting confirmation screen SC14(see FIG. 3), instead of T24. The setting confirmation screen SC14 is ascreen indicating contents of the setting information (that is, theplural setting values) inputted in the setting screen SC13.

When the OK button B13 in the setting screen SC13 is selected, the app28 supplies the communication executing instruction to the OS program 26in T26 after a predetermined time has elapsed since the settingconfirmation screen SC14 began to be displayed. Due to this, processessimilar to T28 to T30 are executed, and the NFC screen SC5 is displayedpreferentially over the setting confirmation screen SC14. Processesafter the NFC screen SC5 is displayed are similar to T50 to T68 of FIG.2.

When the Wi-Fi connection is established in T68, the app 28 sends a scanexecuting request to the multifunction peripheral 100 by using the Wi-Ficonnection via the Wi-Fi I/F 16, instead of T70 and T72. The scanexecuting request is a request for causing the multifunction peripheral100 to execute scanning of a document, and includes the settinginformation inputted in the setting screen SC13.

When the multifunction peripheral 100 receives the scan executingrequest from the portable terminal 10, it executes scanning of thedocument in accordance with the setting information in the scanexecuting request, and sends scan data representing a scanned image tothe portable terminal 10 by using the Wi-Fi connection.

In the scan process above as well, the portable terminal 10 does notsupply the communication executing instruction to the OS program 26before the setting information is inputted in the setting screen SC13.As such, a situation in which a Wi-Fi connection is established beforethe setting information is inputted, a scan executing request including,for example, default setting information is sent to the multifunctionperipheral 100, and scan data generated according to the default settinginformation is received from the multifunction peripheral 100 can besuppressed.

(Corresponding Relationships)

The portable terminal 10, the print scan app 28, the multifunctionperipheral 100, and the print function or the scan function arerespectively examples of “terminal device”, “computer-readableinstructions”, “function executing device”, and “specific function”. Theselection of the print button B1 or the scan button B2 in the menuscreen SC1 in FIG. 3 is an example of an “instruction”. The NFC I/F 14and the Wi-Fi I/F 16 are respectively examples of “first wirelessinterface” and “second wireless interface”. The connection informationCI is an example of “connection information”. The NFC connection in T50and the Wi-Fi connection in T68 of FIG. 2 are respectively examples of“first wireless connection” and “second wireless connection”. The printexecuting request or the scan executing request are examples of“function executing request”. The preview screen SC4 or the settingconfirmation screen SC14 in FIG. 3 are examples of “confirmationscreen”. The NFC screen SC5 is an example of “predetermined screen”.T20, T26, and T72 of FIG. 2 are respectively examples of “causing adisplay unit to display a setting screen”, “supplying a communicationexecuting instruction to an OS program”, and “sending a functionexecuting request to a function executing device”.

Second Embodiment

In this embodiment, a part of process which the CPU 22 of the portableterminal 10 executes according to the app 28 differs from that of thefirst embodiment.

(Process of Portable terminal 10; FIG. 4)

A process which the CPU 22 of the portable terminal 10 executesaccording to the app 28 will be described with reference to FIG. 4. Theprocess of FIG. 4 is initiated with the activation of the app 28 as atrigger. Hereinbelow as well, processes which the CPU 22 executesaccording to the app 28 will not be described with the CPU 22 as thesubject of action, but with the app 28 as the subject of action.

In S8, the app 28 causes the display units 12 to display the respectivescreens SC1 to SC4, similarly to T12 to T24 of FIG. 2. When the OKbutton B3 in the setting screen SC3 (see FIG. 3) is selected, the app 28determines in S10 whether or not a Wi-Fi connection with a multifunctionperipheral (such as 100) is currently established. Specifically, the app28 supplies to the Wi-Fi I/F 16 an inquiry command for inquiring whethera Wi-Fi connection is currently established. In a case where a Wi-Ficonnection is currently established, the Wi-Fi I/F 16 reads an SSID of aWi-Fi network in which the portable terminal 10 is participating from amemory (not shown) of the Wi-Fi I/F 16, and supplies this SSID to theapp 28 as a response to the inquiry command. In a case of obtaining theresponse including the SSID from the Wi-Fi I/F 16, the app 28 determinesthat the Wi-Fi connection is currently established with themultifunction peripheral. On the other hand, in a case where a responseincluding an SSID is not obtained from the Wi-Fi I/F 16, the app 28determines that no Wi-Fi connection is currently established with anymultifunction peripheral.

In the case of determining that the Wi-Fi connection with themultifunction peripheral is currently established (YES in S10), the app28 causes the display unit 12 to display an inquiry screen in S30. Theinquiry screen is a screen for inquiring whether or not to use themultifunction peripheral with which the Wi-Fi connection is currentlyestablished (hereinbelow termed “target multifunction peripheral”). Theinquiry screen includes an OK button for accepting a selection to usethe target multifunction peripheral and a cancel button for accepting aselection not to use the target multifunction peripheral.

In S32, the app 28 determines whether or not the OK button in theinquiry screen is selected. In a case where the OK button in the inquiryscreen is selected (YES in S32), the app 28 causes the display unit 12to display a preview screen SC8 in S34, instead of the preview screenSC4 displayed in S8. The preview screen SC8 is similar to the previewscreen SC4 except for including an execution button B8 for accepting aninstruction to execute printing. On the other hand, the app 28 proceedsto S14 in a case where the cancel button in the inquiry screen isselected (NO in S32).

In S36, the app 28 determines whether or not the execution button B8 inthe preview screen SC8 is selected. In a case where the execution buttonB8 in the preview screen SC8 is selected (YES in S36), the app 28 sendsthe print executing request to the target multifunction peripheral viathe Wi-Fi I/F 16 by using the Wi-Fi connection in S40. When the processof S40 is completed, the process of FIG. 4 is completed. On the otherhand, the app 28 returns to S8 in a case where the cancel button B4 inthe preview screen SC8 is selected (NO in S36).

Further, in the case of determining that no Wi-Fi connection iscurrently established with any multifunction peripheral (NO in S10), theapp 28 determines in S12 whether or not connection information (that is,an SSID and a password) that was used in the past to establish a Wi-Ficonnection with a multifunction peripheral is stored in the memory 24.For example, in a case where the process of FIG. 4 is executed for thefirst time, no connection information is stored in the memory 24. On theother hand, in a case where it is the second or more times the processof FIG. 4 is executed and a process of S14 (to be described later) wasexecuted when the process of FIG. 4 was executed for the first time, theconnection information received from the multifunction peripheral 100 isstored in the memory 24 as a result of the process of T58 of FIG. 2having been executed when the process of FIG. 4 was executed for thefirst time. In this case, the connection information that was used inthe past is stored in the memory 24. The app 28 determines that there isa past record of a Wi-Fi connection having been established with amultifunction peripheral (hereinbelow termed “specific multifunctionperipheral”) in a case where connection information is stored in thememory 24 (YES in S12), and proceeds to S20.

In S20, the app 28 causes the display unit 12 to display a connectionselecting screen. The connection selecting screen is a screen forallowing the user to select whether or not to establish a Wi-Ficonnection with the specific multifunction peripheral. The connectionselecting screen includes an OK button for accepting a selection toestablish the Wi-Fi connection and a cancel button for accepting aselection not to establish the Wi-Fi connection. In a case where aplurality of connection information corresponding to pluralmultifunction peripherals is stored in the memory 24, the connectionselecting screen may include a selection field for selecting onemultifunction peripheral from among the plural multifunctionperipherals.

In S22, the app 28 determines whether or not the OK button in theconnection selecting screen is selected. In a case where the OK buttonin the connection selecting screen is selected (YES in S22), the app 28proceeds to S24. S24 and S26 are similar to S34 and S36. On the otherhand, in a case where the cancel button in the connection selectingscreen is selected (NO in S22), the app 28 proceeds to S14.

In a case where the execution button B8 in the preview screen SC8 isselected (YES in S26), the app 28 supplies the connection instructionincluding the connection information in the memory 24 to the OS program26 in S28. Due to this, the OS program 26 supplies the Wi-Fi instructionto the Wi-Fi I/F 16, and the Wi-Fi I/F 16 executes communication ofvarious signals for establishing a Wi-Fi connection with the specificmultifunction peripheral.

Next, the app 28 monitors in S16 whether or not the Wi-Fi connection isestablished with the specific multifunction peripheral. In a case wherethe Wi-Fi connection is established with the specific multifunctionperipheral (YES in S16), the app 28 sends the print executing request tothe specific multifunction peripheral in S40 by using the establishedWi-Fi connection. The process of FIG. 4 is thereby completed.

Further, in a case of determining that no Wi-Fi connection is currentlyestablished with any multifunction peripheral (NO in S10) anddetermining that no connection information is stored in the memory 24(NO in S12), the app 28 proceeds to S14. In S14, the app 28 supplies thecommunication executing instruction to the OS program 26. Due to this,processes similar to T28 to T68 of FIG. 2 are executed, and a Wi-Ficonnection is thereby established. In this case, the app 28 sends theprint executing request to the multifunction peripheral in S40 by usingthe established Wi-Fi connection. Due to this, the process of FIG. 4 isthereby completed.

(Specific Cases A and B; FIGS. 5 and 6)

Specific cases realized by the process of FIG. 4 will be described. InCase A of FIG. 5, after processes similar to T12 to T72 of FIG. 2 havebeen executed by the processes of S8 to S16 and S40 of FIG. 4, the Wi-Ficonnection established in T68 of FIG. 2 is disconnected due to a powerof the multifunction peripheral 100 being turned off or the like. Sincethere is a past record of the Wi-Fi connection having been establishedwith the multifunction peripheral 100, the memory 24 stores theconnection information CI in T58 of FIG. 2.

In T110, the operation to activate the app 28 is performed again by theuser. Due to this, processes similar to T12 to T24 of FIG. 2 areexecuted (S8 of FIG. 4).

In T130, the app 28 supplies the inquiry command to the Wi-Fi I/F 16. Inthe present case, since no Wi-Fi connection is currently established,the app 28 does not obtain a response including an SSID from the Wi-FiI/F 16, as a result of which it determines that a Wi-Fi connection isnot currently established with the multifunction peripheral 100 (NO inS10).

Next, the app 28 determines that the connection information CI is storedin the memory 24 in T134 (YES in S12). In T136, the app 28 causes thedisplay unit 12 to display a connection selecting screen SC9 (S20).Here, upon storing the connection information CI, the memory 24 furtherstores a model name “mfp1” of the multifunction peripheral 100. The app28 causes the display unit 12 to display the connection selecting screenSC9 including the model name “mfp1” of the multifunction peripheral 100.Then, when an OK button B9 in the connection selecting screen SC9 isselected (YES in S22), the app 28 causes the display unit 12 to displaythe preview screen SC8 (S24).

In T140, the app 28 accepts the selection of the execution button B8 inthe preview screen SC8 (YES in S26). Due to this, the app 28 suppliesthe connection instruction including the connection information CI tothe OS program 26 in T162 (S28). T166 to T174 are similar to T66 to T74of FIG. 2. In the present case as well, processes similar to T60 and T64of FIG. 2 are executed after the process of T140, however, depictionthereof is omitted in FIG. 5.

In the present case, in the case where the connection information CI isstored in the memory 24 (T134) due to the Wi-Fi connection having beenestablished with the multifunction peripheral 100 in the past, theportable terminal 10 establishes the Wi-Fi connection by using thestored connection information CI (T168). That is, the portable terminal10 can establish the Wi-Fi connection without supplying thecommunication executing instruction for establishing the NFC connectionto the OS program 26. Due to this, the user does not have to bring theportable terminal 10 close to the multifunction peripheral 100, thususer convenience is improved. Further, since the communication via theNFC I/F 14 does not have to be executed, the Wi-Fi connection with themultifunction peripheral 100 can promptly be established. In the presentcase, the Wi-Fi connection in T168 of FIG. 5 and the connectioninformation CI are respectively examples of “fourth wireless connection”and “past-record information”.

(Case B; FIG. 6)

In Case B of FIG. 6, the Wi-Fi connection established in T68 of FIG. 2is maintained without being disconnected after a process similar to thatof FIG. 2 has been executed.

T210 is similar to T110 of FIG. 5. Due to this, processes similar to T12to T24 of FIG. 2 are executed. T230 is similar to T130 of FIG. 5. In thepresent case, since the Wi-Fi connection is currently established, theapp 28 obtains a response including the SSID “xxx” from the Wi-Fi I/F 16and determines that the Wi-Fi connection is currently established withthe multifunction peripheral 100 (YES in S10).

In T236, the app 28 causes the display unit 12 to display an inquiryscreen SC10 (S30 of FIG. 4). Then, when an OK button B10 in the inquiryscreen SC10 is selected (YES in S32), the app 28 causes the display unit12 to display the preview screen SC8 (S34). T240 to T274 are similar tothe T140 to T174 of FIG. 5 except that the Wi-Fi connection establishedin the process of FIG. 2 is used.

In the present case, in the case where the Wi-Fi connection is currentlyestablished between the portable terminal 10 and the multifunctionperipheral 100 (T232), the portable terminal 10 sends the printexecuting request to the multifunction peripheral 100 by using thisWi-Fi connection. That is, the portable terminal 10 can send the printexecuting request to the multifunction peripheral 100 without supplyingthe communication executing instruction for establishing the NFCconnection to the OS program 26 and further without executing theprocesses to establish the Wi-Fi connection. Due to this, the user doesnot have to bring the portable terminal 10 close to the multifunctionperipheral 100, thus the user convenience is improved. Further, sincethe communication via the NFC I/F 14 and the communication forestablishing the Wi-Fi connection do not have to be executed, the printexecuting request can promptly be sent to the multifunction peripheral100. In the present case, the Wi-Fi connection established in an initialstate of FIG. 6 is an example of “third wireless connection”.

(Variant 1) The Wi-Fi I/F 16 of the portable terminal 10 may support theWFD scheme. In this case, the portable terminal 10 may operate in the CLstate of the WFD scheme in T68 of FIG. 2, and may establish a wirelessconnection according to the WFD scheme with the multifunction peripheral100. In this variant, the wireless connection according to the WFDscheme is an example of “second wireless connection”.

(Variant 2) In each of the above embodiments, the portable terminal 10receives the SSID for identifying the Wi-Fi network from themultifunction peripheral 100 in T52 of FIG. 2. Instead of this, theportable terminal 10 may receive an SSID for identifying an AP networkin which an Access Point (AP) participates as a parent station and themultifunction peripheral 100 participates as a child station, from themultifunction peripheral 100. Further, in T68 of FIG. 2, the portableterminal 10 may establish a wireless connection with the AP by using theSSID of the AP network. The portable terminal 10 may send the printexecuting request to the multifunction peripheral 100 in T72 via the APby using the wireless connection established with the AP. In thisvariant, the wireless connection established with the AP is an exampleof “second wireless connection”.

(Variant 3) In each of the above embodiments, the portable terminal 10receives the connection information CI from the multifunction peripheral100 by using the NFC connection (T52 of FIG. 2). Instead of this, theportable terminal 10 may send an SSID and a password for causing themultifunction peripheral 100 to participate as a child station in aWi-Fi network in which the portable terminal 10 operates as a parentstation, to the multifunction peripheral 100 by using the NFCconnection. Further, in T68 of FIG. 2, the portable terminal 10 mayestablish a Wi-Fi connection with the multifunction peripheral 100 byusing the SSID and the password to cause the multifunction peripheral100 to participate in the Wi-Fi network as the child station. In thisvariant, the SSID and the password sent from the portable terminal 10 tothe multifunction peripheral 100 are an example of “connectioninformation”.

(Variant 4) In each of the above embodiments, the NFC screen SC5 isdisplayed in front of the preview screen SC4. Instead of this, the NFCscreen SC5 may be displayed after the preview screen SC4 has beenclosed. In this variant, displaying the NFC screen SC5 after the previewscreen SC4 has been closed is an example of “causing a display unit todisplay a predetermined screen preferentially over a confirmationscreen”.

(Variant 5) The preview screen SC4 of FIG. 3 may not be displayed. Inthis variant, “causing a display unit to display a confirmation screen”may be omitted.

(Variant 6) In T26 of FIG. 2, the portable terminal 10 may supply thecommunication executing instruction to the OS program 26 immediatelyafter the preview screen SC4 is displayed without waiting for thepredetermined time to elapse since the preview screen SC4 began to bedisplayed.

(Variant 7) The NFC screen SC5 of FIG. 3 may not be displayed. In thisvariant, the OS program may not cause the display unit to display thepredetermined screen.

(Variant 8) “First wireless interface” may not be an I/F for executingthe NFC communication, and may be an I/F, for example, for executingwireless communication according to another communication scheme such asBlueTooth (registered trademark), infrared, or TransferJet. Further,“second wireless interface” may not be an I/F for executing the wirelesscommunication according to the Wi-Fi scheme, and may be an I/F, forexample, for executing wireless communication according to anothercommunication scheme such as Bluetooth.

(Variant 9) In each of the above embodiments, the respective processesof FIGS. 2 to 6 are executed by the CPU 22 of the portable terminal 10executing the print scan application 28 (that is, software). Instead ofthis, one or more of the processes may be implemented by hardware suchas logic circuits.

What is claimed is:
 1. A non-transitory computer-readable medium storingcomputer-readable instructions for a terminal device, thecomputer-readable instructions, when executed by a processor of theterminal device, causing the terminal device to: in a case where aninstruction for using a specific function executable by a functionexecuting device is inputted, cause a display unit of the terminaldevice to display a setting screen for inputting setting information forexecuting the specific function; before the terminal device communicateswith the function executing device via a first wireless interface of theterminal device, determine whether past-record information is stored ina memory of the terminal device, the past-record information indicatingthat there is a past record of a specific wireless connection havingbeen established via a second wireless interface of the terminal device,the second wireless interface being different from the first wirelessinterface, the specific wireless connection being for communicating withthe function executing device; in a case where it is determined that thepast-record information is not stored in the memory and the settinginformation is inputted in the setting screen, supply a communicationexecuting instruction to an operating system (OS) program of theterminal device, the communication executing instruction being forinstructing to execute communication via the first wireless interface,the communication executing instruction being not supplied to the OSprogram before the setting information is inputted in the settingscreen, wherein the OS program supplies a signal sending instruction tothe first wireless interface in response to obtaining the communicationexecuting instruction, the first wireless interface starts sending apolling signal in response to obtaining the signal sending instruction,establishes a first wireless connection with the function executingdevice in response to sending the polling signal to the functionexecuting device, and communicates connection information with thefunction executing device by using the first wireless connection, andthe OS program establishes, by using the connection information, asecond wireless connection for communicating with the function executingdevice via the second wireless interface of the terminal device; and ina case where the second wireless connection is established, send afunction executing request to the function executing device via thesecond wireless interface by using the second wireless connection, thefunction executing request being for causing the function executingdevice to execute the specific function according to the settinginformation, in a case where it is determined that the past-recordinformation is stored in the memory, supply a connection instruction tothe OS program without supplying the communication executing instructionto the OS program, wherein in response to obtaining the connectioninstruction, the OS program establishes the specific wireless connectionvia the second wireless interface by using the past-record information;and in a case where the specific wireless connection is established,send the function executing request to the function executing device viathe second wireless interface by using the specific wireless connection.2. The non-transitory computer-readable medium as in claim 1, whereinthe OS program establishes, by using the connection information, thesecond wireless connection with the function executing device via thesecond wireless interface.
 3. The non-transitory computer-readablemedium as in claim 1, wherein the computer-readable instructions, whenexecuted by the processor of the terminal device, further cause theterminal device to: in a case where the setting information is inputtedin the setting screen, cause the display unit to display a confirmationscreen for the setting information; and after a predetermined time haselapsed since the confirmation screen was displayed, the communicationexecuting instruction is supplied to the OS program.
 4. Thenon-transitory computer-readable medium as in claim 3, wherein the OSprogram causes the display unit to display a predetermined screenpreferentially over the confirmation screen in response to obtaining thecommunication executing instruction, the predetermined screen indicatingthat the communication via the first wireless interface is executable.5. The non-transitory computer-readable medium as in claim 1, whereinthe computer-readable instructions, when executed by the processor ofthe terminal device, further cause the terminal device to: after thesetting information has been inputted in the setting screen, determinewhether a third wireless connection is currently established via thesecond wireless interface, the third wireless connection being forcommunicating with the function executing device; and in a case where itis determined that the third wireless connection is currentlyestablished, send the function executing request to the functionexecuting device via the second wireless interface by using the thirdwireless connection, without supplying the communication executinginstruction to the OS program, wherein in a case where it is determinedthat the third wireless connection is not currently established: thecommunication executing instruction is supplied to the OS program; andthe function executing request is sent to the function executing devicevia the second wireless interface by using the second wirelessconnection.
 6. The non-transitory computer-readable medium as in claim1, wherein the first wireless interface is configured to execute awireless communication according to a Near Field Communication (NFC)scheme, and the second wireless interface is configured to execute awireless communication according to a Wi-Fi scheme.
 7. A terminal devicecomprising: a display unit; a first wireless interface; a secondwireless interface being different from the first wireless interface; aprocessor; and a memory storing computer-readable instructions therein,the computer-readable instructions, when executed by the processor,causing the terminal device to: in a case where an instruction for usinga specific function executable by a function executing device isinputted, cause the display unit to display a setting screen forinputting setting information for executing the specific function;before the terminal device communicates with the function executingdevice via the first wireless interface, determine whether past-recordinformation is stored in a memory of the terminal device, thepast-record information indicating that there is a past record of aspecific wireless connection having been established via the secondwireless interface of the terminal device, the specific wirelessconnection being for communicating with the function executing device;in a case where it is determined that the past-record information is notstored in the memory and the setting information is inputted in thesetting screen, supply a communication executing instruction to anoperating system (OS) program of the terminal device, the communicationexecuting instruction being for instructing to execute communication viathe first wireless interface, the communication executing instructionbeing not supplied to the OS program before the setting information isinputted on the setting screen, wherein the OS program supplies a signalsending instruction to the first wireless interface in response toobtaining the communication executing instruction, the first wirelessinterface starts sending a polling signal in response to obtaining thesignal sending instruction, establishes a first wireless connection withthe function executing device in response to sending the polling signalto the function executing device, and communicates connectioninformation with the function executing device by using the firstwireless connection, and the OS program establishes, by using theconnection information, a second wireless connection for communicatingwith the function executing device via the second wireless interface;and in a case where the second wireless connection is established, senda function executing request to the function executing device via thesecond wireless interface by using the second wireless connection, thefunction executing request being for causing the function executingdevice to execute the specific function according to the settinginformation in a case where it is determined that the past-recordinformation is stored in the memory, supply a connection instruction tothe OS program without supplying the communication executing instructionto the OS program, wherein in response to obtaining the connectioninstruction, the OS program establishes the specific wireless connectionvia the second wireless interface by using the past-record information;and in a case where the specific wireless connection is established,send the function executing request to the function executing device viathe second wireless interface by using the specific wireless connection.